<?PHP

echo "<div class='cours_fiche_droite'>";
  $passage=0;
  echo "<div id='anomalies'>";
    $anomalies= recherche_anomalie($course);
    if(isset($anomalies) AND $anomalies!==0){
     echo "<table class='acces_direct ui-widget ui-widget-content ui-state-error'><thead class='ui-widget-header'><tr><th>Anomalies</th></tr></thead>";
      echo "<tr><td>".$anomalies."</td></tr>";
     echo "</table>"; 
    }
  echo "</div>";
  
  
  echo "<table><thead class='ui-widget-header'><tr><th>Acc&egrave;s directs</th></tr></thead>";
  echo "<tr><td><a href='../course/view.php?id=".$id."' target='_blank'><img src='includes/images/moodle_48.png' title='Accès Moodle' alt='Accès Moodle' /> Cours</a></td></tr>";
  echo "<tr><td><a href='../course/edit.php?id=".$course->id."' target='_blank'><img src='includes/images/tools.png' title='Parametres' alt='Parametres' /> Param&egrave;tres</a></td></tr>";
  echo "<tr><td><a href='../admin/roles/assign.php?contextid=".$coursecontext->id."' target='_blank'><img src='includes/images/cours_roles.gif' title='Attributions des r&ocirc;les' alt='Attributions des r&ocirc;les' /> Attributions des r&ocirc;les</a></td></tr>";
  echo "<tr><td><a href='../course/report.php?id=".$course->id."' target='_blank'><img src='includes/images/cours_historique.gif' title='Historique du cours' alt='Historique Moodle' /> Historique Moodle</a></td></tr>";
  echo "</table>";                                                                                                           

  echo "<table><thead class='ui-widget-header'><tr><th>Actions</th></tr></thead>";
  $visibilite[0]="Caché";
  $visibilite[1]="Visible";
  
  if ($course->visible=="1"){$contraire=0;}else{$contraire=1;}
  
  echo "<tr><td id='visibilite'>".$visibilite[$course->visible]." > <a href='#' onclick='";
    ?>
    $("#visibilite").load("cours/cours_modif_visibilite.php" , {course:<?PHP echo $course->id;?>,visible:<?PHP echo $contraire;?>});location.reload();'>
    <?PHP echo "Rendre ".$visibilite[$contraire]."</a></td></tr>";

    
  echo "<tr><td><a href='#'>Collaboratif / Non Collaboratif</a></td></tr>";
  echo "<tr><td><a href='../backup/backup.php?id=".$course->id."' target='_blank'><img src='includes/images/cours_sauvegarde.gif' title='Sauvegarde du cours' alt='Sauvegarde du cours' /> Sauvegarde du cours</a></td></tr>";
  echo "<tr><td><a href='#' target='_blank'><img src='includes/images/cross.png' title='Supprimer le cours' alt='Supprimer le cours' /> Supprimer le cours</a></td></tr>";
  echo "</table>";                                                                                                           

echo "</div>";

?>
